package com.itheima;

public class Demo1 {
    public  void show(){
        System.out.println("父类成员方法show");
    }
    public void get(){
        System.out.println("父类成员方法get");
    }

    public Demo1() {
        super();
    }
}


class Demo2 extends Demo1{
    private  String name;

    public Demo2(String name) {
        this();
        this.name = name;
    }

    public void show(){
        System.out.println("子类成员方法show");
    }

    public void get(){
        super.show();
        System.out.println("子类成员方法get");
    }
    public Demo2() {
        this.show();

    }

}
class Demo3 {
    public static void main(String[] args) {
        Demo2 d2=new Demo2();
        d2.show();
        d2.show();
    }
}